home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / linuxcon.000 / linuxcon / linuxconf-1.6 / mailconf / internal.h < prev    next >
C/C++ Source or Header  |  1996-07-21  |  3KB  |  120 lines

  1. #pragma interface
  2. #ifndef INTERNAL_H
  3. #define INTERNAL_H
  4.  
  5. #ifndef MISC_H
  6.     #include "../misc/misc.h"
  7. #endif
  8.  
  9. class MAILCONF_HELP_FILE: public HELP_FILE{
  10.     /*~PROTOBEG~ MAILCONF_HELP_FILE */
  11. public:
  12.     MAILCONF_HELP_FILE (const char *fname);
  13.     /*~PROTOEND~ MAILCONF_HELP_FILE */
  14. };
  15.  
  16.  
  17. // Special case where we dictate to sendmail which forwarding host to use
  18. class SPC_ROUTE: public ARRAY_OBJ{
  19. public:
  20.     SSTRING to;        // Destination of the mail
  21.     SSTRING mailer;        // mailer used to reach the forwarder
  22.     SSTRING forwarder;
  23.     char subdomain;        // Deliver to subdomain also
  24.     /*~PROTOBEG~ SPC_ROUTE */
  25. public:
  26.     SPC_ROUTE (void);
  27.     int edit (void);
  28.     void write (FILE *fout);
  29.     /*~PROTOEND~ SPC_ROUTE */
  30. };
  31.  
  32. class SPC_ROUTES: public ARRAY{
  33.     /*~PROTOBEG~ SPC_ROUTES */
  34. public:
  35.     SPC_ROUTES (void);
  36.     int build (const char *dbformat);
  37.     int edit (void);
  38.     SPC_ROUTE *getitem (int no);
  39.     int save (void);
  40.     void sort (void);
  41.     /*~PROTOEND~ SPC_ROUTES */
  42. };
  43.  
  44. class COMPLEX_ROUTE: public ARRAY_OBJ{
  45. public:
  46.     char active;
  47.     SSTRING from;
  48.     SSTRING to;
  49.     SSTRING router;
  50.     SSTRING mailer;
  51.     SSTRING new_from;
  52.     SSTRING new_to;
  53.     SSTRING comment;
  54.     /*~PROTOBEG~ COMPLEX_ROUTE */
  55. public:
  56.     COMPLEX_ROUTE (const char *buf);
  57.     COMPLEX_ROUTE (void);
  58.     int edit (void);
  59.     int rule0 (FILE *fout, char *status);
  60.     /*~PROTOEND~ COMPLEX_ROUTE */
  61. };
  62.  
  63. class COMPLEX_ROUTES: public ARRAY{
  64.     /*~PROTOBEG~ COMPLEX_ROUTES */
  65. public:
  66.     COMPLEX_ROUTES (void);
  67.     int edit (void);
  68.     COMPLEX_ROUTE *getitem (int no);
  69.     int rule0 (FILE *fout);
  70.     void save (void);
  71.     /*~PROTOEND~ COMPLEX_ROUTES */
  72. };
  73.  
  74.  
  75. #define NB_ALIAS 5
  76. #define MAXDNSFOR 5
  77.  
  78. class MAILCONF{
  79.     SSTRINGS alias;
  80.     SSTRING mailas;        // System name we are using
  81.                 // when mailing out
  82.     SSTRING mailhost;    // We send all mail to this machine
  83.                 // including local one.
  84.     SSTRING smarthost;    // We send what we can't resolve
  85.     SSTRING smartmailer;    // Mailer used to send to smarthost
  86.     struct {
  87.         SSTRING dontmasque;    // Users which will never be
  88.                     // masquerade using mailas
  89.         SSTRING deliverlocal;    // Users who received their
  90.                     // mail on this machine even
  91.                     // if we have a mailhost
  92.     } users;
  93.     struct {
  94.         char dnsneeded;        // Sendmail perform only if it can
  95.                             // find the DNS
  96.         char nodns;            // Never use the DNS to canonify hostname
  97.         char uucpnobatch;    // No -r option for uux
  98.         SSTRING dbformat;    // format for mailertable
  99.         int uucpmax;        // Taille maximum du mail uucp
  100.     } features;
  101.     SSTRINGS dnsfor;        // Use the DNS only for those domains
  102.                     // See the large comment about
  103.                     // DNS scope in basic.c
  104.     SPC_ROUTES spcs;    // Special routes using mailertable
  105.     COMPLEX_ROUTES cplxs;
  106.     SSTRING deliver;    // Utility to deliver local mail
  107.     /*~PROTOBEG~ MAILCONF */
  108. public:
  109.     MAILCONF (void);
  110.     int basicedit (void);
  111.     int generate (bool);
  112.     void spcs_edit (void);
  113.     int write (void);
  114.     /*~PROTOEND~ MAILCONF */
  115. };
  116.  
  117.  
  118. #endif
  119.  
  120.